﻿@{
    ViewBag.Title = "Smart Pay";
}

@*<h2>@ViewBag.Message</h2>
<p>
    To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc</a>.
</p>

<ul data-role="listview" data-inset="true">
    <li data-role="list-divider">Navigation</li>
    <li>@Html.ActionLink("About", "About", "Home")</li>
    <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
</ul>*@

@using (Html.BeginForm("Signature", "Home", FormMethod.Post, new { id = "frmPayment" } )) {
    <div data-role="fieldcontain">
        <label for="selectmenu1">
            Servicio
        </label>
        <select id="selectmenu1" name="">
            <option value="1">
                Condominios
            </option>
            <option value="2">
                Parqueos
            </option>
            <option value="value">
                Consultorios
            </option>
        </select>
    </div>
    <div data-role="fieldcontain">
        <label for="selectmenu2">
            Nombre
        </label>
        <select id="selectmenu2" name="">
            <option value="1">
                Los Geranios
            </option>
            <option value="2">
                San Marino
            </option>
            <option value="3">
                Hacienda del Sol
            </option>
        </select>
    </div>
    <div data-role="fieldcontain">
        <label for="selectmenu3">
            Condominio
        </label>
        <select id="selectmenu3" name="">
            <option value="1">
                A1
            </option>
            <option value="2">
                A2
            </option>
            <option value="3">
                A3
            </option>
        </select>
    </div>
    <div data-role="fieldcontain">
        <label for="txtAmount">
            Monto
        </label>
        <input name="txtAmount" id="txtAmount" placeholder="" value="" type="tel">
    </div>
    <input id="cmdPay" type="submit" value="Leer Tarjeta">
}

@section scripts {
    <script>
        $(document).ready(function () {
            $("#cmdPay").click(function (event) {
                var $form = $(this),
                    amount = $form.find('input[name="txtAmount"]').val(),
                    url = $form.attr('action');
                window.location = url;
            });
        });
        //$("#frmPayment").submit(function (event) {
        //    /* stop form from submitting normally */
        //    event.preventDefault();

        //    /* get some values from elements on the page: */
        //    var $form = $(this),
        //        amount = $form.find('input[name="txtAmount"]').val(),
        //        url = $form.attr('action');
        //    window.location = url;
        //    /* Send the data using post */
        //    //var posting = $.get(url, { amount: amount });

        //    /* Put the results in a div */
        //    //posting.done(function (data) {
        //    //    var content = $(data).find('#content');
        //    //    $("#result").empty().append(content);
        //    //});
        //});
    </script>
}